<?php if($banner['all']){?>
<div class="module">
		<?php foreach ($banner['all'] as $banner):?>
		
		<div class="ads">
		<a href="<?= base_url(); ?>banner/banner/click_banner/<?= $this->commoncall->clean_url($banner->link);?>/<?= $banner->id;?> "><img class="img-responsive" alt="Responsive image" src="<?= base_url(); ?>assets/images/banner/<?= $banner->file; ?> " alt="<?= $banner->title; ?> title="<?= $banner->title; ?>" /></a>
		</div>
		
		<?php endforeach;?>
		</div>
<?php }?>










<!-- 

THIS IS A VERY IMPORTANT CODE FOR BANNER BY-- //rahul4u1994@gmail.com//rahul sinha


	//--show = 1: index Page 2: inner page
	function getBanner($show=2, $limit=5, $max_clicks=0, $max_impression=0){
		
		if($show == 2 ){
			$sql = "select * from banner where (clicks < max_clicks and impressions < max_impressions or max_clicks = 0 or max_impressions = 0) and shows = $show and status=51 limit $limit ";
		}
		
		if($show == 1 ){
			$sql = "select * from banner where (clicks < max_clicks and impressions < max_impressions or max_clicks = 0 or max_impressions = 0) and shows != 2 and status=51 limit $limit";
		}
		//print $sql;
		$result = $this->db->query($sql)->result();

		if($result){
			return $result;
		}else{
			return false;
		}
	}
 -->